package com.example.smartcity_poverty.ui.AllService.PetHospital.adapter

import com.example.smartcity_poverty.App.Companion.url
import com.example.smartcity_poverty.Base.BaseRecyclerAdapter
import com.example.smartcity_poverty.logic.ServiceBean.PetHospitalBean.PhMoreAllModel
import com.example.smartcity_poverty.logic.util.Util.glide
import kotlinx.android.synthetic.main.re_ph_home_more.*

/**
 *  created by ikun
 *  ANDROID STUDIO - version 4.0
 *  email: jinkunwei41@gmail.com
 * --------------------------------
 *
 **/
class PhHomeMoreAdapter(
    val list: MutableList<PhMoreAllModel.DataBean>,
    layoutId: Int
) : BaseRecyclerAdapter<PhMoreAllModel.DataBean>(list, layoutId) {
    override fun setData(
        view: BaseViewHolder.ViewFind,
        data: PhMoreAllModel.DataBean,
        position: Int,
        holder: BaseViewHolder
    ) {
        val d = list[position]

        glide(url + d.imgUrl, view.phMoreImage)
        view.phMoreTitle.text = d.name
    }
}